<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="application/javascript" th:src="@{/js/jquery-3.5.1.js}"></script>

</head>
<body>
<div th:fragment="header" id="header" class="v3-app-layout__header">
    <div class="siteHeader">
        <div class="siteHeader__inner">
            <div class="v3-app-layout__logo-wrap">
                <a class="logo" href="/" title="首页"></a>
            </div>
            <div class="search-wrap">
                <input type="text" id="searchTitle"  th:value="${title}==null?'':${title}" class="input" />
                <div class="SearchPreset show" style="height: 33px; margin: 4px 0">
                    <ul></ul>
                </div>
                <a  id="search" onclick="sea()" class="search-btn"><i class="icon-search btn__search"></i><span>搜索</span></a>
                <div class="SearchList ">
                    <div class="SearchList__history" style="display: none">
                        <h5 class="SearchList__history__title">搜索历史</h5>
                        <a class="SearchList__history__clear">清空历史</a>
                    </div>
                </div>
            </div>
            <div class="right-wrap">
                <ul class="nav-list">
                    <li class=""><a href="/video/toaddVideo" target="_blank" rel="nofollow">
                        <div>
                            <i class="icon-publish-video"></i>
                        </div>发布视频
                    </a></li>
                </ul>
                <div class="BU-Component-Header-Avatar">

                    <div class="BU-Component-Header-Avatar__container">

                        <a th:if="${session.get('user')}!=null" href="/user/toHome" target="_blank" data-disable_default="true">
                            <div class="BU-Component-Header-Avatar__image"
                                 th:style="'display: inline-block; width: 44px; height: 44px; border-radius: 22px; background-size: 100%; background-image: url('+${session.user.avatar}+'); cursor: pointer'">
                            </div>
                        </a>

                        <div th:if="${session.get('user')}!=null" class="loginButton">
                            <div class="avatar-logo"></div>
                            <a href="/user/logout">

                                <span>退出登录</span>
                            </a>
                        </div>
                        <div th:unless="${session.get('user')}!=null" class="loginButton">
                            <div class="avatar-logo"></div>
                            <a  href="/toLogin">

                                <span>登录</span>
                            </a>


                        </div>


                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>